import request from '@/utils/request'
// 注册
export const RegAPI = obj => {
  return request.post('/api/reg', obj)
}
// 登录
export const loginAPI = obj => {
  return request.post('/api/login', obj)
}
// 获取用户信息
export const getUserAPI = () => {
  return request.get('/my/userinfo')
}
// 更新用户信息
export const updatUserAPI = obj => {
  return request.put('/my/userinfo', obj)
}
// 重置密码
export const updatePwAPI = data => {
  return request.patch('/my/updatepwd', data)
}
// 上传头像
export const updateAvatarAPI = res => {
  return request.patch('/my/update/avatar', { avatar: res })
}
